﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using JTicket.BLL;

namespace JTicket.UI
{
    public partial class JT_RePrintManager : RoleBase
    {
        private readonly BLL.D_OperInfo bllOper = new BLL.D_OperInfo();
        public List<Model.H_ShenHe> _shenhe { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bind();
        }
        void Bind()
        {
            Model.D_OperInfo oper = bllOper.Oper();
            int page = 0;
            int pages = 0;
            string s = "1";
            if (!string.IsNullOrEmpty(Request.QueryString["page"]))
                page = int.Parse(Request.QueryString["page"]);
            if (!string.IsNullOrEmpty(Request.QueryString["s"]))
                s = Request.QueryString["S"];
            if (oper.CurLevel.ToString() == "0")
                _shenhe = DAL.H_ShenHe.ShenHeList(s);
            else
                _shenhe = DAL.H_ShenHe.ShenHeList(s, oper.ThCode);
            ScriptManager.RegisterStartupScript(
               this, typeof(Page), "pages", string.Format("var page={0};var pages={1};", page, pages), true);
        }
        
        public string st(string s,string flag)
        {
            switch (s)
            {
                case "0":
                    return "审核已通过";
                case "1":
                    
                  return "<a  href=\"javascript:IsExcut('"+flag+"');\">审核通过</a>"; 
                default:
                  return "<a  href=\"javascript:IsExcut('" + flag + "');\">审核通过</a>"; 

             }
        }
    }
}